/*
 * @Author: your name
 * @Date: 2020-05-21 10:48:05
 * @LastEditTime: 2020-06-01 18:13:24
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \IM_Web\im_web\src\router.js
 */
import Vue from 'vue'
import Router from 'vue-router'
// import Home from './views/Home.vue'
// import Login from './views/login/index.vue'
// import ForgetPassword from './views/forgetPassword/index.vue'
// import Registered from './views/registered/index.vue'
Vue.use(Router)

export default new Router({
    routes: [{
        path: '/',
        name: 'index',
        component: () =>
            import( /* webpackChunkName: "about" */ './views/index/index.vue'),
        meta: {
            requireAuth: true
        },
        children: [
            {
                path: '/user',
                name: 'user',
                component: () =>
                    import( /* webpackChunkName: "about" */ './views/mineCenter/index.vue'),
                meta: {
                    requireAuth: true
                }
            }
        ]
    },
    {
        path: '/login',
        name: 'login',
        component: () =>
            import( /* webpackChunkName: "about" */ './views/login/index.vue'),
        meta: {
            requireAuth: false
        }
    },
    {
        path: '/passport',
        name: 'passport',
        component: () =>
            import( /* webpackChunkName: "about" */ './views/reset/index.vue'),
        meta: {
            requireAuth: false
        }
    }]
})
